<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>音乐滚动列表示例</title>

    <style>
      html {
        width: 100%;
        height: 100%;
      }
      body {
        margin: 0;
        background-color: black;
        color: gray;
        text-align: center;

        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      a {
        color: white;
        text-decoration: none;
      }
      a:hover {
        cursor: pointer;
        color: blue;
      }

      .container {
        width: 100%;
        display: flex;
        justify-content: space-around;
      }
    </style>
  </head>
  <body>
    <div id="lyricContainer" class="container"></div>
    <audio id="audioElement" src="./不浪漫罪名.mp3" controls></audio>
    <script src="../music-lyric.js"></script>
    <script>
      fetch("./不浪漫罪名.lrc")
        .then((response) => response.text())
        .then((text) => {
          const lyricListElement =
            MusicLyricModule.createDynamicLyricListElement(audioElement, text);
          lyricContainer.appendChild(lyricListElement);
        })
        .catch((error) => console.error(error));
    </script>
  </body>
</html>
